package com.linsir.model;


import java.util.List;

import com.linsir.common.base.BaseModel;
import com.linsir.common.utils.xx;
import com.jfinal.plugin.activerecord.Db;
/**
 * @author linsir
 * @title: MenuObject
 * @projectName linsir-mu
 * @description: 菜单关联对象
 * @date 2021/12/3 23:17
 */
public class MenuObject extends BaseModel<MenuObject>{

    private static final long serialVersionUID = 9176734392973431592L;

    public static final MenuObject dao = new MenuObject();

    /**
     * 获取菜单关联对象
     * @param menuCode
     * @return
     */
    public List<MenuObject> queryByMenuCode(String menuCode) {
        return MenuObject.dao.queryByCache("select object_code from eova_menu_object where menu_code = ?", menuCode);
    }

    /**
     * 删除菜单关联数据对象
     * @param menuCode
     */
    public void deleteByMenuCode(String menuCode) {
        Db.use(xx.DS_EOVA).update("delete from eova_menu_object where menu_code = ?", menuCode);
    }
}
